package com.lrm.dao;

import com.lrm.po.Blog;
import com.lrm.po.Visitor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;



public interface VisitRepository extends JpaRepository<Visitor, Long>{

//    @Query("select u from t_visitor")
    List<Visitor> findAll();


    @Query(value = "insert into t_visitor(content, create_time, image_url) values(#{content},#{createTimeq},#{imageUrl})",nativeQuery = true)
    void insertVisitor(Visitor visitor);


}
